<template>
    <div class="body1">
        <div class="no-print el-button-print">
            <el-button @click="exportPDF">导出为pdf</el-button>
        </div>
        <div class="body2" id="pdfDom" style="white-space: pre-wrap;" :class="{ 'pdf-export': isPdfExport }">
            <div class="title">
                <div class="biaotididian">{{ agencyName }}</div>
                <div class="biaoti">行政检查通知书（项目）</div>
            </div>
            <div class="foreword1">
                <input v-model="form.a1" :resize="'none'" autosize maxlength="4" class="inputStyle1"
                    style="width: 80px;font-family: 仿宋;font-size: 5mm;text-align: center" type="textarea">
                <span>（</span>
                <reference-select style="width: 5mm;margin-bottom: 4px" v-model="form.referenceValue"
                    class="InvestigatorSelectReplace" />
                <span>）行检通字[</span>
                <input v-model="form.a2" :resize="'none'" autosize maxlength="4" class="areaInputStyle"
                    style="width: 40px;font-family: 仿宋;font-size: 5mm;text-align: center" type="textarea"
                    oninput="this.value = this.value.replace(/[^a-zA-Z0-9_-]/g, '')">
                <span>]第</span>
                <input v-model="form.a37" :resize="'none'" autosize maxlength="5" class="areaInputStyle"
                    style="width: 50px;font-family: 仿宋;font-size: 5mm;text-align: center" type="textarea"
                    oninput="this.value = this.value.replace(/[^a-zA-Z0-9_-]/g, '')">
                <span>号</span>
            </div>
            <div class="tableStyle1">
                <div class="writ-height">
                    <div style="display: inline-block; position: relative;">
                        <privy-info-select v-model="form.unitName" v-model:isSelected="form.isUnit" return-fields="A(B)"
                            :rowConfig="unitNameConfig">
                        </privy-info-select>
                    </div>
                    <span>：</span>
                </div>
                <div class="writ-height">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;根据</span><input v-model="form.a4" :resize="'none'" autosize
                        maxlength="27" class="inputStyle1" style="width: calc(27 * 5mm);font-family: 仿宋;font-size: 5mm;"
                        type="textarea">，
                </div>
                <div class="writ-height">
                    <span>决定对</span><input v-model="form.a5" :resize="'none'" autosize maxlength="29"
                        class="inputStyle1" style="width: calc(29 * 5mm);font-family: 仿宋;font-size: 5mm;"
                        type="textarea">
                </div>
                <div class="writ-height">
                    <span>实施行政检查，现将相关事项通知如下：</span>
                </div>
                <div class="writ-height">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;一、项目涉及各方主体</span>
                </div>
                <div style="height: 70px; line-height: 35px;">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;1.建设单位：</span>
                    <CrossRowInput v-model:value="form.a6" :line-config="a6Config"></CrossRowInput>
                </div>
                <div style="height: 70px; line-height: 35px;">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;2.勘察单位：</span>
                    <CrossRowInput v-model:value="form.a7" :line-config="a7Config"></CrossRowInput>
                </div>
                <div style="height: 70px; line-height: 35px;">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;3.设计单位：</span>
                    <CrossRowInput v-model:value="form.a8" :line-config="a8Config"></CrossRowInput>
                </div>
                <div style="height: 70px; line-height: 35px;">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;4.施工单位：</span>
                    <CrossRowInput v-model:value="form.a9" :line-config="a9Config"></CrossRowInput>
                </div>
                <div style="height: 70px; line-height: 35px;">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;5.监理单位：</span>
                    <CrossRowInput v-model:value="form.a10" :line-config="a10Config"></CrossRowInput>
                </div>
                <div style="height: 105px; line-height: 35px;">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;6.其他单位：</span>
                    <CrossRowInput v-model:value="form.a11" placeholder="(根据实际情况填写，注明名称、统一社会信用代码)"
                        :line-config="a11Config"></CrossRowInput>
                </div>
                <div class="writ-height">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;二、行政执法人员信息</span>
                </div>
                <div class="writ-height" style="margin-bottom: 1px">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;姓名：</span>
                    <InvestigatorSelect class="InvestigatorSelectReplace"
                        style="height: 6mm; width: calc(9 * 5mm);margin-bottom: 4px;border-bottom: 1px solid black"
                        v-model="form.a12" :id-field="'a13'" @change="handleInvestigatorChange" />
                    <span>执法证件号：</span>
                    <input v-model="form.a13" :resize="'none'" autosize class="inputStyle1" readonly
                        style="width: calc(10 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                </div>
                <div class="writ-height" style="margin-bottom: 1px">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;姓名：</span>
                    <InvestigatorSelect class="InvestigatorSelectReplace"
                        style="height: 6mm; width: calc(9 * 5mm);margin-bottom: 4px;border-bottom: 1px solid black"
                        v-model="form.a14" :id-field="'a15'" @change="handleInvestigatorChange" />
                    <span>执法证件号：</span>
                    <input v-model="form.a15" :resize="'none'" autosize class="inputStyle1" readonly
                        style="width: calc(10 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                </div>
                <div class="writ-height">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;三、行政检查时间及地点</span>
                </div>
                <div class="writ-height">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;时间：</span>
                    <editable-textarea :text="form.date1" param-type="YYYYMMDD1"
                        @send-to-parent="receiveFromChild"></editable-textarea>
                    <span>(</span>
                    <editable-textarea :text="form.time1" param-type="HH:mm1"
                        @send-to-parent="receiveFromChild"></editable-textarea>
                    <span>)至</span>
                    <editable-textarea :text="form.date2" param-type="YYYYMMDD2"
                        @send-to-parent="receiveFromChild"></editable-textarea>
                    <span>(</span>
                    <editable-textarea :text="form.time2" param-type="HH:mm2"
                        @send-to-parent="receiveFromChild"></editable-textarea>
                    <span>)</span>
                </div>
                <div class="writ-height">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;地点：</span>
                    <input v-model="form.a16" :resize="'none'" autosize maxlength="27" placeholder="(项目所在地)"
                        class="inputStyle1" style="width: calc(27 * 5mm);font-family: 仿宋;font-size: 5mm;"
                        type="textarea">
                </div>
                <div class="writ-height">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;四、行政检查法律依据</span>
                </div>
            </div>
            <div class="page-break">
            </div>
            <div class="tableStyle2">
                <div style="height: 100%; line-height: 30px;">
                    <div style="height: 122px; width: 162mm;">
                        <el-input type="textarea" v-model="form.v1" :rows="v1Config.maxLines"
                            @keydown.native="handleKeyDown('v1', $event)" @input="handleInput('v1', $event)"
                            @paste.native="handlePaste('v1', $event)" class="el-textarea-hidden"
                            style=" height: 100%;white-space: pre;overflow-x: auto;font-family: monospace;"
                            wrap="soft" />
                    </div>
                    <div class="writ-height">
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;五、行政检查内容及方式</span>
                    </div>
                    <div style="height: 152px; width: 162mm;">
                        <el-input type="textarea" v-model="form.v2" :rows="v2Config.maxLines"
                            @keydown.native="handleKeyDown('v2', $event)" @input="handleInput('v2', $event)"
                            @paste.native="handlePaste('v2', $event)" class="el-textarea-hidden"
                            style=" height: 100%;white-space: pre;overflow-x: auto;font-family: monospace;"
                            wrap="soft" />
                    </div>
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="checkbox"
                        v-model="form.a17" /><span>同步开展音像记录</span>
                    <br><span>&nbsp;&nbsp;&nbsp;&nbsp;请提供以下材料、物品和必要的工作条件，配合行政执法人员依法开展各项检查活动。如拒不配合检查，将依法承担法律责任。</span>
                    <br><span>&nbsp;&nbsp;&nbsp;&nbsp;（一）材料、物品清单：</span>
                    <CrossRowInput v-model:value="form.a18" :line-config="a18Config"></CrossRowInput>
                    <br><span>&nbsp;&nbsp;&nbsp;&nbsp;（二）到场配合行政检查的人员：</span>
                    <CrossRowInput v-model:value="form.a19" :line-config="a19Config"></CrossRowInput>
                    <br><span>&nbsp;&nbsp;&nbsp;&nbsp;（三）其他：</span>
                    <CrossRowInput v-model:value="form.a20" :line-config="a20Config"></CrossRowInput>
                    <div class="writ-height">
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;六、行政检查频次</span>
                    </div>
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;本次检查系</span><input type="checkbox"
                        v-model="form.a21" /><span>日常检查</span><input type="checkbox"
                        v-model="form.a22" /><span>专项检查，年度行政检查频次上限：</span>
                    <input v-model="form.a23" :resize="'none'" autosize maxlength="4" class="inputStyle1"
                        style="width: calc(2 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea"
                        oninput="this.value = this.value.replace(/[^0-9]/g, '')"><span>次，本次为第</span>
                    <input v-model="form.a24" :resize="'none'" autosize maxlength="4" class="inputStyle1"
                        style="width: calc(2 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea"
                        oninput="this.value = this.value.replace(/[^0-9]/g, '')"><span>次。</span>
                    <br><span>&nbsp;&nbsp;&nbsp;&nbsp;本次检查系根据</span><input type="checkbox"
                        v-model="form.a25" /><span>投诉举报</span><input type="checkbox"
                        v-model="form.a26" /><span>转办交办</span><input type="checkbox"
                        v-model="form.a27" /><span>数据监测</span><input type="checkbox"
                        v-model="form.a28" /><span>应被检查人申请</span>
                    <input type="checkbox" v-model="form.a29" /><span>媒体曝光</span><input type="checkbox"
                        v-model="form.a30" /><span>其他</span>
                    <input v-model="form.a31" :resize="'none'" autosize maxlength="24" class="inputStyle1"
                        style="width: calc(24 * 5mm);font-family: 仿宋;font-size: 5mm;"
                        type="textarea"><span>发起的行政检查，不受年度检查频次上限限制。</span>
                    <div class="writ-height">
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;七、权利告知</span>
                    </div>
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;（一）如你单位发现存在行政执法人员不出示行政执法证件等违反规定实施行政检查的情形，有权拒绝接受检查。</span>
                    <br><span>&nbsp;&nbsp;&nbsp;&nbsp;（二）如你单位认为行政执法人员与检查工作有直接利害关系或者有其他关系可能影响公正执法，可以申请回避。是否同意回避的决定将在</span>
                    <input v-model="form.a32" :resize="'none'" autosize maxlength="4" class="inputStyle1"
                        style="width: calc(2 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea"
                        oninput="this.value = this.value.replace(/[^0-9]/g, '')"><span>日内作出并告知你单位，回避申请审查期间不停止行政检查。</span>
                </div>
            </div>
            <div class="page-break">
            </div>
            <div class="tableStyle2">
                <div style="height: 730px; line-height: 30px;">
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;（三）你单位有权监督行政检查工作全过程，如认为行政检查侵犯你单位合法权益，有权投诉举报、依法获得救济。</span>
                    <br><span>&nbsp;&nbsp;&nbsp;&nbsp;（四）其他</span>
                    <CrossRowInput v-model:value="form.a33" :line-config="a33Config"></CrossRowInput>
                </div>
                <div>
                    <div style="text-align: right; margin-top: 10px; margin-bottom: 50px;">
                        <div class="seal-container">
                            <span class="seal-name" v-html="sealName"></span>
                            <div class="delivery-agency-div" :class="{ 'official-seal-display': isDisplay }">
                                <editable-textarea :text="form.date3" param-type="YYYYMMDD3"
                                    @send-to-parent="receiveFromChild" />
                                <img class="official-seal" src="../../assets/tupian.png" alt="Image">
                            </div>
                        </div>
                    </div>
                </div>

                <div style="line-height: 30px;">
                    <span>行政执法主体联系人、联系方式：</span><input v-model="form.a34" :resize="'none'" autosize maxlength="17"
                        class="inputStyle1" style="width: calc(17 * 5mm);font-family: 仿宋;font-size: 5mm;"
                        type="textarea">
                    <span>受送达人：</span><input v-model="form.a35" :resize="'none'" autosize maxlength="20"
                        class="inputStyle1" style="width: calc(20 * 5mm);font-family: 仿宋;font-size: 5mm;"
                        type="textarea">
                    <editable-textarea :text="form.date4" param-type="YYYYMMDD4" @send-to-parent="receiveFromChild" />
                    <br><span>送达方式与地址：</span><input v-model="form.a36" :resize="'none'" autosize maxlength="24"
                        class="inputStyle1" style="width: calc(24 * 5mm);font-family: 仿宋;font-size: 5mm;"
                        type="textarea">
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import "@/utils/print.css";
import CrossRowInput from "@/views/template/CrossRowInput";
import EditableTextarea from "@/views/template/EditableTextarea";
import { agencyName, sealName } from "../../utils/publicName.js"

import InvestigatorSelect from "@/views/template/InvestigatorSelect";
import PrivyInfoSelect from "@/views/template/PrivyInfoSelect";
import ReferenceSelect from "@/views/template/ReferenceSelect";
import { createInputLimiter } from '@/utils/limitInput';

export default {
    name: "202507251643",
    components: {
        EditableTextarea,
        CrossRowInput,
        InvestigatorSelect,
        ReferenceSelect,
        PrivyInfoSelect
    },
    data() {

        return {
            agencyName: agencyName,
            sealName: sealName,
            form: {
                isUnit: true,
            },
            status: '', //当前文书的状态
            isPdfExport: false, //控制打印样式
            isDisplay: true, //控制官方印章的显示
            unitNameConfig: {
                firstLine: { chars: 28 * 2 },
                middleLines: { count: 0, chars: 32 * 2 },
                lastLine: { chars: 0 * 2 }
            },
            a6Config: {
                firstLine: { chars: 24 * 2 },
                middleLines: { count: 0, chars: 32 * 2 },
                lastLine: { chars: 32 * 2 }
            },
            a7Config: {
                firstLine: { chars: 24 * 2 },
                middleLines: { count: 0, chars: 32 * 2 },
                lastLine: { chars: 32 * 2 }
            },
            a8Config: {
                firstLine: { chars: 24 * 2 },
                middleLines: { count: 0, chars: 32 * 2 },
                lastLine: { chars: 32 * 2 }
            },
            a9Config: {
                firstLine: { chars: 24 * 2 },
                middleLines: { count: 0, chars: 32 * 2 },
                lastLine: { chars: 32 * 2 }
            },
            a10Config: {
                firstLine: { chars: 24 * 2 },
                middleLines: { count: 0, chars: 32 * 2 },
                lastLine: { chars: 32 * 2 }
            },
            a11Config: {
                firstLine: { chars: 24 * 2 },
                middleLines: { count: 1, chars: 32 * 2 },
                lastLine: { chars: 32 * 2 }
            },
            a18Config: {
                firstLine: { chars: 19 * 2 },
                middleLines: { count: 0, chars: 32 * 2 },
                lastLine: { chars: 32 * 2 }
            },
            a19Config: {
                firstLine: { chars: 15 * 2 },
                middleLines: { count: 0, chars: 32 * 2 },
                lastLine: { chars: 32 * 2 }
            },
            a20Config: {
                firstLine: { chars: 24 * 2 },
                middleLines: { count: 0, chars: 32 * 2 },
                lastLine: { chars: 32 * 2 }
            },
            a33Config: {
                firstLine: { chars: 25 * 2 },
                middleLines: { count: 0, chars: 32 * 2 },
                lastLine: { chars: 32 * 2 }
            },
            v1Config: {
                maxLines: 4,
                charsPerLine: 32 * 2,
                maxLength: 4 * 32 * 2,
                inputLimiter: null,
                displayText: ''
            },
            v2Config: {
                maxLines: 5,
                charsPerLine: 32 * 2,
                maxLength: 5 * 32 * 2,
                inputLimiter: null,
                displayText: ''
            },
        };

    },
    created() {
        //调用父页面函数获取文书数据
        window.parent.getTemplateData((data) => {
            this.form = data;
            this.status = status;
        })
        //将方法暴露在初始化加载中
        window.postForm = () => {
            this.postForm();
        }
        this.v1Config.inputLimiter = createInputLimiter(this, {
            maxLines: this.v1Config.maxLines,
            charsPerLine: this.v1Config.charsPerLine,
            maxLength: this.v1Config.maxLength,
            propName: `form.v1`
        });
        this.v2Config.inputLimiter = createInputLimiter(this, {
            maxLines: this.v2Config.maxLines,
            charsPerLine: this.v2Config.charsPerLine,
            maxLength: this.v2Config.maxLength,
            propName: `form.v2`
        });
    },

    mounted() {
        window.parent.changeTemplateDow();
    },
    methods: {
        getConfigName(field) {
            switch (field) {
                case 'v1':
                    return this.v1Config;
                case 'v2':
                    return this.v2Config;
            }
        },
        handleKeyDown(field, e) {
            const config = this.getConfigName(field);
            config.inputLimiter.handleKeyDown(e);
        },
        handleInput(field, value) {
            const config = this.getConfigName(field);
            this.form[field] = config.inputLimiter.handleInput(value);
        },
        handlePaste(field, e) {
            const config = this.getConfigName(field);
            config.inputLimiter.handlePaste(e);
        },
        // 导出为pdf
        exportPDF() {
            if (this.status !== '4') {
                this.isDisplay = false
            }
            this.savePDF()
                .then((blob) => {
                    const blobUrl = URL.createObjectURL(blob);

                    // 先预览
                    const previewWindow = window.open(blobUrl, '_blank');

                    // 自动下载
                    const fileName = `行政检查通知书（项目）.pdf`;
                    const downloadLink = document.createElement('a');
                    downloadLink.href = blobUrl;
                    downloadLink.download = fileName;
                    document.body.appendChild(downloadLink);
                    downloadLink.click();
                    document.body.removeChild(downloadLink);

                    // 监听预览窗口关闭后释放内存
                    if (previewWindow) {
                        const timer = setInterval(() => {
                            if (previewWindow.closed) {
                                clearInterval(timer);
                                URL.revokeObjectURL(blobUrl);
                            }
                        }, 1000);
                    } else {
                        setTimeout(() => URL.revokeObjectURL(blobUrl), 10000); // 兜底释放
                    }
                })
                .catch(error => {
                    console.error('导出PDF出错:', error);
                    alert('导出失败，请重试或联系管理员');
                });
        },
        savePDF() {
            this.isPdfExport = true; // 激活PDF样式
            return new Promise((resolve, reject) => {
                this.$nextTick(() => {
                    import('html2pdf.js').then((module) => {
                        const html2pdf = module.default;

                        //获取所有需要替换的 el-input
                        const elInputs = document.querySelectorAll('.el-textarea-hidden .el-input__inner, .el-textarea-hidden .el-textarea__inner');

                        //存储原始元素和它们的父节点，方便后续恢复
                        const originalElements = [];

                        elInputs.forEach((input) => {
                            const div = document.createElement('div');
                            div.style.whiteSpace = 'pre-wrap'; // 保留换行
                            div.style.fontFamily = '仿宋';
                            div.style.fontSize = '19px';
                            div.style.height = '100%';
                            div.style.width = '100%';

                            div.textContent = input.value; // 保留原内容（自动处理 \n 换行）
                            div.style.lineHeight = '30px';
                            div.style.backgroundImage = 'linear-gradient(to top, #000 1px, transparent 1px)';
                            div.style.backgroundSize = '100% 30px';
                            div.style.backgroundRepeat = 'repeat-y';
                            div.style.backgroundPosition = '0 -3px';
                            div.style.padding = '0';
                            div.style.boxSizing = 'border-box';


                            // 替换 el-input，并存储原始元素
                            originalElements.push({
                                parent: input.parentNode,
                                original: input,
                                replacement: div,
                            });
                            input.parentNode.replaceChild(div, input);
                        });

                        // 处理选择执法人的替换
                        const InvestigatorSelectSelects = document.querySelectorAll('.InvestigatorSelectReplace .el-input__inner, .InvestigatorSelectReplace .el-textarea__inner');
                        InvestigatorSelectSelects.forEach((input) => {
                            const div = document.createElement('div');
                            div.style.whiteSpace = 'pre-wrap'; // 保留换行
                            div.style.fontFamily = '仿宋';
                            div.style.fontSize = '5mm';
                            div.textContent = input.value; // 保留原内容（自动处理 \n 换行）
                            div.style.lineHeight = '1.3';

                            // 替换 el-input，并存储原始元素
                            originalElements.push({
                                parent: input.parentNode,
                                original: input,
                                replacement: div,
                            });
                            input.parentNode.replaceChild(div, input);
                        });

                        // 配置选项
                        const opt = {
                            margin: 0,
                            image: {
                                type: 'jpeg',
                                quality: 0.98
                            },
                            html2canvas: {
                                scale: 2,
                                logging: false,
                                useCORS: true
                            },
                            jsPDF: {
                                unit: 'mm',
                                format: 'a4',
                                orientation: 'portrait'
                            }
                        };

                        const element = document.getElementById('pdfDom');

                        // 生成PDF Blob对象
                        html2pdf()
                            .set(opt)
                            .from(element)
                            .toPdf()
                            .get('pdf')
                            .then((pdf) => {
                                const blob = pdf.output('blob');

                                resolve(blob); // 返回Blob对象
                            })
                            .catch((error) => {
                                reject(error);
                            })
                            .finally(() => {
                                this.isPdfExport = false; // 恢复原始样式
                                // 恢复原始input
                                originalElements.forEach(({ parent, original, replacement }) => {
                                    parent.replaceChild(original, replacement);
                                });
                            });
                    }).catch((error) => {
                        reject(error);
                        this.isPdfExport = false;
                        originalElements.forEach(({ parent, original, replacement }) => {
                            parent.replaceChild(original, replacement);
                        });
                    });
                });
            });
        },
        //父页面提交按钮将调用此方法，此方法将文书数据回传到父页面的请求方法中
        postForm() {
            this.savePDF()
                .then((blob) => {


                    // 创建FormData并添加文件
                    const formData = new FormData();
                    formData.append('file', blob, '行政检查通知书（项目）.pdf');

                    window.parent.postTemplateDate(this.form, formData);
                })
                .catch(error => {
                    console.error('整个保存PDF出错:', error);
                });
        },
        //选择日期时间
        receiveFromChild(data, type) {
            const TypeMap = {
                'YYYYMMDD1': 'date1',
                'YYYYMMDD2': 'date2',
                'YYYYMMDD3': 'date3',
                'YYYYMMDD4': 'date4',
                'HH:mm1': 'time1',
                'HH:mm2': 'time2'
            };
            if (TypeMap[type]) {
                this.form[TypeMap[type]] = data;
            }
        },
        //选择执法人员
        handleInvestigatorChange({ identificationNumber, idField }) {
            if (idField && identificationNumber) {
                this.form[idField] = identificationNumber;
            }
        }
    },

}
</script>

<style scoped>
.official-seal {
    /* 公章隐藏*/
    display: none;
    width: 4.2cm;
    height: 4.2cm;
    z-index: 20;

    /* 定位 */
    position: absolute;
    bottom: -20px;
    right: -10px;
}


:deep(.el-button-print .el-button) {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto;
    min-width: 100px;
    height: auto;
    padding: 8px 15px;
    background: #fff !important;
    color: #000 !important;
    border: none;
}

:deep(.el-textarea__inner) {
    box-shadow: 0 0 0 0;
    color: black;
    padding: 0;
    font-family: "仿宋", serif;
    font-size: 19px;
    overflow-y: hidden;
    line-height: 30px;

    /* 下划线 */
    border-radius: 0px;
    background-image: linear-gradient(to top, #000000 0.5px, transparent 1px);
    background-size: 100% 30px;
    background-position: 0 -3px;
}

:deep(.el-textarea-hidden .el-textarea__inner) {
    box-shadow: 0 0 0 0;
    color: black;
    padding: 0;
    font-family: "仿宋", serif;
    font-size: 19px;
    overflow-y: hidden !important;
    resize: none !important;
    height: auto !important;
}

:deep(.el-select .el-input__inner) {
    text-align: center;
    height: 5mm;
}

.input-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.inputStyleNoLine {
    border: none;
    outline: none;
    padding: 0px;
}

.typeSpan {
    cursor: pointer;
    font-size: 5mm;
}
</style>
